from ultralytics import YOLO

# Load a COCO-pretrained YOLO11n model
model = YOLO("yolo11n.pt")

# Train the model on the COCO8 example dataset for 100 epochs
results = model.train(data="/data/yolo11/gxhyolo/datasets/gxh.yaml", epochs=200, imgsz=640)

# Run inference with the YOLO11n model on the 'bus.jpg' image
results = model("/home/gxh/Pictures/p/xx.png")
results[0].show()
